package com.one.pass;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@Slf4j
@EnableFeignClients(basePackages = "com.one.pass.fegin")
@MapperScan(basePackages = "com.one.pass.dal")
@EnableAsync
public class Application {

    public static void main(String[] args) {
        try {
            // 设置ForkJoinPool的并行级别
            // 用于并行处理任务的线程池，特别适用于那些可以递归分解成更小任务的工作，例如并行流（parallel streams）和并行计算
            System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "100");
            SpringApplication.run(Application.class, args);

            log.info("启动成功");
        } catch (Throwable e) {
            log.info("启动异常", e);
        }

    }
}
